package com.sinevil.tcpTrans.entity.json;

import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import lombok.Data;

/**
 * @Classname BasicJson
 * @Description TODO
 * @Version 1.0.0
 * @Date 2024/12/12 19:53
 * @Created by sinevil
 */

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type")
@JsonSubTypes({
        @JsonSubTypes.Type(value = InstructionJson.class, name = "instruction"),
        @JsonSubTypes.Type(value = FilePacketJson.class, name = "filePacket"),
        @JsonSubTypes.Type(value = FileInfoJson.class, name = "fileInfo"),
})
@Data
public abstract class BasicJson {

    public String type;

}
